Chris Pollett > Old Classes >
CS185c

( Print View )

Student Corner:
  [Grades Sec5]

  [Submit Sec5]

  [Class Sign Up Sec5]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HWs and Quizzes:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Quizzes]  [Project]

Practice Exams:
  [Mid]  [Final]

                           












CS185c Spring 2012Practice Midterm

Everyone is expected to know what we've talked about for each of the three languages discussed in this course: Java, Objective-C, and Javascript. Questions about how to get a phone to do something though can be answered for any of the platforms we've considered. To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

  1. Explain the difference between an emulator and a simulator. Explain how to set the icon for your app (either iOS or Android).
  2. Explain how to create (a) a class method, (b) an instance method in Objective-C, (c) how argument passing works in Objective-C.
  3. Explain HTML 5 data-* attributes, explain how the HTML 5 viewport meta tag works.
  4. Show the necessary code and describe any interface building activities needed to create a small app (platform of your choice from amongst those covered this semester) with a button on it, which when clicked opens an alert dialog with the words "Cancel Me!" on it. When the user clicks cancel me, the alert goes away.
  5. Describe the roles of each following Android App building blocks: Activities, Intents, and Services.
  6. For either iOS or Android, give the code to make the keyboard go away if the user clicks outside of the text input area.
  7. For at least two of the platforms we covered this semester explain how to check if the devices orientation has changed and if so to switch the layout presented.
  8. Give the code (platform of your choice amongst those covered this semester) necessary to write an informational log message "It's cramped in here" associated with the TooSmallApp.
  9. Give code for either iOS or Android to create a sqlite database, SimpleDB, with one table, SimpleTable, with only a single integer column, SimpleColumn. Then give the code to insert a row ("5") into it.
  10. For either iOS or Android, give code to open a connection to my.mailserver.org on port 25, and then send the string, "HELO my.mailserver.org"